<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core'%>
<%@ taglib uri="http://shiro.apache.org/tags" prefix="shiro"%>
<c:set var="v" value="1"></c:set>
<%
//System.out.println("this is decorator");
%>
<!DOCTYPE html>
<html>
<head>
	<title>${webTitle} <sitemesh:write property='title'/></title>
	
	<script src="../static/lib/jquery_1.11.0.js"></script>
	
	<link   href="../static/lib/zui/css/zui.min.css" rel="stylesheet">
	<link   href="../static/lib/zui/css/zui-theme.css" rel="stylesheet">
	<script src="../static/lib/zui/js/zui.min.js"></script>
	
	<script src="../static/lib/My97DatePicker/WdatePicker.js"></script><!-- 日历 -->
	
	<script src="../static/lib/myzui.js?${v}"></script><!-- zui二次封装 -->
	<script src="../static/lib/zghValidator.js?${v}"></script><!-- 表单验证 -->
	<script src="../static/js/tool.js?${v}"></script><!-- 工具 -->
	<script src="../static/lib/treeSelector.js?${v}"></script><!-- 树形选择器 -->
	<link   href="../static/style/app.css?${v}" rel="stylesheet"><!-- app定制样式 -->
	<sitemesh:write property='head'/>
	
	<link   href="../static/lib/animate.css" rel="stylesheet">
</head>
<body>
	<div id="north">
		<nav class="navbar navbar-inverse" role="navigation">
			<div class="container-fluid">
				<!-- 导航头部 -->
				<div class="navbar-header">
					<!-- 移动设备上的导航切换按钮 -->
					<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse-example">
						<span class="sr-only">切换导航</span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
					</button>
					<!-- 品牌名称或logo -->
					<a class="navbar-brand" href="../main/home">${webTitle}</a>
				</div>
				<!-- 导航项目 -->
				<div class="collapse navbar-collapse navbar-collapse-example">
					<!-- 一般导航项目 -->
					<ul class="nav navbar-nav" id="cont_menusHtml">${menusHtml}</ul>
					<!-- 右侧的导航项目 -->
					<ul class="nav navbar-nav navbar-right">
						<li><a><i class="icon icon-user"></i> <shiro:principal/></a></li>
						<li><a onclick="myzui.confirm('确认退出?',function(){location='../sys/logout';});"><i class="icon-signout"></i> 退出</a></li>
					</ul>
				</div>
			</div>
		</nav>	
	</div>
	
	<div id="south">
		<div class="container-fluid" style="padding-top:1em;">
			<sitemesh:write property='body'/>
		</div>
	</div>

	<script type="text/javascript">
		if(window.cache==undefined) {
			cache = {};
		}
		
		$(function() {
			//选择器为只读
			$(".app_selector").each(function(){
				$(this).attr("readonly","readonly");
				$(this).css("backgroundColor","#fff");
			});

			//自动初始化日期选择器
			$(".app_datetime").click(function(){WdatePicker({dateFmt:"yyyy-MM-dd HH:mm:ss"});});
			$(".app_date").click(function(){WdatePicker({dateFmt:"yyyy-MM-dd"});});
			
			//初次加载菜单
			if($("#cont_menusHtml").html().length == 0) {
				tool.query("../sys/loadMenusHtml",{},function(res) {
					console.info("loadMenus");
					$("#cont_menusHtml").html(res.data);
				});
			}
		});
	</script>
</body>
</html>